package com.qkl.xiatang.app.entity.message;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName(value = "message_user")
public class MessageUserEntity {

    public static final int STATUS_UNREAD = 0;

    @TableId(type= IdType.ASSIGN_ID)
    private String id;

    private String messageId;

    private String userId;

    private Integer status;

    private Date createTime;

    private Date updateTime;

    public boolean unread(){
        return (null == status) || ( STATUS_UNREAD == status);
    }


}
